CC=g++
CFLAGS=-Wall -g -I/usr/local/mongodb-cxx-drver/include/mongocxx/v_noabi -I/usr/local/mongodb-cxx-drver/include/bsoncxx/v_noabi
LFLAGS=-L/usr/local/mongodb-cxx-drver/lib -lmongocxx -lbsoncxx

src=$(wildcard *.cpp)
targets=$(patsubst %.cpp, %, $(src))

all:$(targets)

$(targets):%:%.cpp
	$(CC) $< -o $@ $(CFLAGS) $(LFLAGS)

.PHONY:clean all
clean:
	- rm -rf $(targets) *.o -f